package com.guangzhi.weijianzhi.activity;

import uk.co.senab.photoview.PhotoViewAttacher;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

import com.guangzhi.weijianzhi.R;
import com.guangzhi.weijianzhi.http.HttpUrls;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.umeng.analytics.MobclickAgent;
/**
 * 
 * @author ht
 *
 */

public class picActivity extends BaseActivity {

	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		
		
		setContentView(R.layout.tz_imageview_layout);
		initTitle();
		titleTextV.setText("图片");
		goBack.setVisibility(View.VISIBLE);
		goBack.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				onBackPressed();
			}
		});
		String url = getIntent().getStringExtra("url");
		
		ImageView image = (ImageView) findViewById(R.id.url_image);
		PhotoViewAttacher mAttacher = new PhotoViewAttacher(image);
		 mAttacher.setZoomable(true);
 	    ImageLoader.getInstance().displayImage(HttpUrls.URL_QINIU+url,image);
		
	}
	@Override
	protected void onResume() {
		super.onResume();
		MobclickAgent.onResume(this);
	}

	@Override
	protected void onPause() {
		super.onPause();
		MobclickAgent.onPause(this);
	}
}
